<form nz-form #checkForm="ngForm" nzLayout="horizontal">
  <div nz-row>
    <div nz-col nzSpan="12">
      <nz-form-item>
        <nz-form-label [nzSpan]="spanLabel" nzRequired>姓名</nz-form-label>
        <nz-form-control [nzSpan]="24-spanLabel" nz-tooltip [nzTooltipTitle]="validateDef.fullName.err">
          <nz-input-group nzPrefixIcon="user">
            <input nz-input placeholder="姓名" [(ngModel)]="userInfo.fullName" name="fullName"/>
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="spanLabel">账号/电话</nz-form-label>
        <nz-form-control [nzSpan]="24-spanLabel">
          <nz-input-group nzPrefixIcon="phone">
            <input nz-input placeholder="账号/电话" [(ngModel)]="userInfo.phone" name="phone" disabled id="userPhone"/>
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label nzRequired [nzSpan]="spanLabel">性别</nz-form-label>
        <nz-form-control [nzSpan]="24-spanLabel" nz-tooltip [nzTooltipTitle]="validateDef.gender.err">
          <nz-select [(ngModel)]="userInfo.gender" name="gender" required>
            <nz-option *ngFor="let data of genderList" [nzLabel]="data.text" [nzValue]="data.value"></nz-option>
          </nz-select>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="spanLabel">邮箱</nz-form-label>
        <nz-form-control [nzSpan]="24-spanLabel" nz-tooltip [nzTooltipTitle]="validateDef.email.err">
          <input nz-input placeholder="邮箱" [(ngModel)]="userInfo.email" name="email" maxlength="100"/>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="spanLabel">QQ</nz-form-label>
        <nz-form-control [nzSpan]="24-spanLabel" nz-tooltip [nzTooltipTitle]="validateDef.qq.err">
          <input nz-input [(ngModel)]="userInfo.qq" name="qq" maxlength="20"/>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="spanLabel">所属公司</nz-form-label>
        <nz-form-control [nzSpan]="24-spanLabel">
          <nz-select nzAllowClear nzShowSearch [(ngModel)]="userInfo.company" nzDisabled name="companyname">
            <nz-option *ngFor="let data of companyList" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
          </nz-select>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="spanLabel">所属省市县</nz-form-label>
        <nz-form-control [nzSpan]="24-spanLabel">
          <nz-cascader nz-input nzChangeOnSelect [nzOptions]="nzOptions" nzDisabled name="citys"
                       [nzShowSearch]="true" [(ngModel)]="userInfo.citys" style="width:100%">
          </nz-cascader>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="spanLabel">身份</nz-form-label>
        <nz-form-control [nzSpan]="24-spanLabel">
          <nz-select [(ngModel)]="userInfo.state" name="state" nzDisabled>
            <nz-option *ngFor="let data of stateList" [nzLabel]="data.text" [nzValue]="data.value"></nz-option>
          </nz-select>
        </nz-form-control>
      </nz-form-item>
    </div>
    <div nz-col nzSpan="12">
      <nz-form-item>
        <nz-form-label [nzSpan]="spanLabel">微信</nz-form-label>
        <nz-form-control [nzSpan]="24-spanLabel">
          <input nz-input [(ngModel)]="userInfo.wechatAccount" name="wechatAccount" maxlength="100"/>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="spanLabel">微信已绑定</nz-form-label>
        <nz-form-control [nzSpan]="24-spanLabel">
          <input nz-input [(ngModel)]="userInfo.iswxbind" name="iswxbind" disabled id="userIswxbind"/>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="24" class="wx-lable">扫描以下二维码进行微信绑定或变更</nz-form-label>
        <nz-form-control [nzSpan]="0">
          <input nz-input #wxunionid [(ngModel)]="userInfo.wxunionid" name="wxunionid" id="userWxunionid"/>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <div class="wx-binddiv" id="divwxbind">
          <iframe onload="wxBind()"></iframe>
        </div>
      </nz-form-item>
    </div>
  </div>
  <div *nzModalFooter>
    <button nz-button nzGhost nzType="primary" (click)="onClose()">关闭</button>
    <button nz-button nzType="primary" (click)="onSave()"
            [nzLoading]="isLoading">
      保存
    </button>
  </div>
</form>
